package com.grooveshark.mobile;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;

import com.grooveshark.mobile.dto.Data;
import com.grooveshark.mobile.util.ActivitiesFlowUtil;
import com.grooveshark.mobile.util.OptimizedListAdapterOptionOne;

import android.app.Activity;
import android.app.ListActivity;
import android.os.Bundle;

public class EstadisticasActivity extends ListActivity {
	
private List<Data> listData = new ArrayList<Data>();
	
	public void onCreate(Bundle bundle) {
		super.onCreate(bundle);
		
		   Calendar cal = Calendar.getInstance();
		   Data data = null;
	        for(int i=0; i<=cal.get(Calendar.DAY_OF_MONTH)-1;i++){        	
	         data = new Data();
	         //SimpleDateFormat sdf = new SimpleDateFormat("EEEE");
	         //String nomDia = cal.get(cal.DAY_OF_WEEK);
	         String dia = String.valueOf(i+1);
	         String mes = String.valueOf(cal.get(cal.MONTH)+1);
	         String anio = String.valueOf(cal.get(cal.YEAR));
	         data.setTexto(dia+"-"+mes+"-"+anio);
	         listData.add(data);
	        }
		
		setListAdapter(new OptimizedListAdapterOptionOne(this,R.layout.item_data,listData));
		
	
	}

}